home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / web / knit / readme < prev    next >
Text File  |  1992-09-23  |  4KB  |  99 lines

  1. % This is README
  2. The PATCHWORK system consists of two programs
  3.    KNIT    a version of TANGLE that can handle multiple changefiles
  4.    TWIST   a version of WEAVE that can handle multiple changefile
  5. and
  6.    PATHCHMAC.TEX   a modified version of WEBMAC.TEX which must be used
  7.        for TeX'ing the output of TWIST.
  8.  
  9. To install the system you should proceed as follows. (The description
  10. is for SUN UNIX but an implementation on other UNIX systems or even
  11. non-UNIX systems should be possible without major problems.)
  12.  
  13. 1. Make a new directory with the files
  14.       knit.ch     twist.ch   patchmac.tex
  15.       demo.web    demo.ch1   demo.ch2      demo.ch3
  16.    and copy (temporarily) also
  17.       tangle.web  weave.web
  18.    which you will surely have already.
  19.  
  20. 2. Tangle tangle.web with knit.ch giving you tangle.p:
  21.       tangle tangle.web knit.ch
  22.  
  23. 3. Rename tangle.p to knit.p and compile it.
  24.       mv tangle.p. knit.p; pc -o knit knit.p
  25.  
  26. 4. If your compiler complains you should modify knit.ch (after
  27.    you have saved the original version). All the necessary modifications
  28.    should be found in your local tangle.ch. Then start at step 2 again.
  29.    (You should record all changes to knit.ch in a separate changefile
  30.     which you might call knit.ch.local. If you have successfully installed
  31.     knit and twist later on, you can reproduce knit from tangle with
  32.     the original (system-independent) knit.ch and your (system-dependent)
  33.     knit.ch.local, e.g.,
  34.        knit tangle.web knit.ch knit.ch.local
  35.    For obvious reasons, the orinal knit.ch is not completely system-
  36.    independent, but it is a version with works for SUN UNIX. However,
  37.    the system-dependencies are rather small.)
  38.  
  39. 5. Repeat steps 2 to 4 correspondingly for weave and twist:
  40.       tangle weave.web twist.ch
  41.       mv weave.p twist.p; pc -o twist twist.p
  42.  
  43. 6. You now have a first version of the PATCHMAC system and might want
  44.    to test how it works:
  45.       ln demo.web webfile
  46.       ln demo.ch1 chfile1
  47.       ln demo.ch2 chfile2
  48.       ln demo.ch3 chfile3
  49.       knit
  50.       mv Pascalfile demo.p; pc -o demo demo.p
  51.       demo
  52.    and you should see on your terminal
  53.       I am line1 from changefile1
  54.       I am line2 from changefile1
  55.       I am line3 from changefile1
  56.       I am line4 from changefile1
  57.       I am line3
  58.       I am line2 from changefile3
  59.       I am line3 from changefile3
  60.       I am line7
  61.       I am line8
  62.       I am line9
  63.       I am line2 from changefile2
  64.       I am line3 from changefile2
  65.       I am line4 from changefile3
  66.       I am line12
  67.    Afterwards you could run twist and TeX it's output:
  68.       twist
  69.       mv texfile demo.tex; tex demo [print or preview it]
  70.  
  71. 7. As you will have noticed in step 6, these versions of twist
  72.    and knit are rather simple and do not allow the usual parsing
  73.    of the command line as your tangle and weave will probably do,
  74.    i.e., the file names for twist and knit have to be
  75.       webfile  chfile1  chfile2 chfile3
  76.    Since you will probably not like this you could write, as a first
  77.    exercise, two changefiles, say
  78.       knit.ch.args  twist.ch.args
  79.    which implement the parsing of the arguments in the command line.
  80.    With
  81.       ln tangle.web webfile
  82.       ln knit.ch chfile1
  83.       ln knit.ch.args chfile2
  84.       knit
  85.       mv Pascalfile knit.p
  86.       pc -o knit knit.p
  87.    (and a similar procedure for twist) you then will get a version
  88.    of knit (and twist) which allows the usual usuage:
  89.       knit name_of_webfile name_of_first_cf name_of_second_cf ...
  90.  
  91. Wolfgang Appelt
  92. GMD
  93. Schlo\ss Birlinghoven
  94. Postfach 1240
  95. D-5205 Sankt Augustin
  96. Germany FR
  97.  
  98. 19 October 1988
  99.